-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add servicemonitor for prometheus #559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution!
Do you think it makes sense to place the prometheus.io/scrape
annotations behind a configuration flag, defaulted to enabled? You don't have to implement this, I've just worked with more charts since we wrote this one and have noticed that in a few that I've used.
We could also move the annotations to the values.yaml and then to a toYaml on the Service, this would allow overwriting. prometheus:
controller:
service:
annotations:
prometheus.io/port: "8080"
prometheus.io/scrape: "true" apiVersion: v1
kind: Service
metadata:
annotations:
{{- toYaml .Values.prometheus.controller.service.annotations | nindent 4 }}
labels:
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! 🚀
We could also move the annotations to the values.yaml and then to a toYaml on the Service, this would allow overwriting.
Good idea, I do like that better. I cut #566 to track that.
@dani-CO-CN LGTM, would you mind solving the conflicts? Otherwise, I can help on doing it. thanks! |
@gthao313 conflicts are resolved! 🚀 |
Issue number:
Closes #558
Description of changes:
Add a named port for the controller-service and add an optional prometheus servicemonitor
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.